package com.example.headfirstprojectdemo.StrategyPattern;

/**
 * 迷你鸭子 升级版本 ，拥有火箭的动力
 */
public class MiniDuckSimulator {
    public static void main(String[] args) {
        Duck mallard = new MallardDuck();
        mallard.performQuack();
        mallard.performFly();


        Duck modelDuck = new ModelDuck();
        modelDuck.performFly();
        /**
         * 拥有火箭动力
         */
        modelDuck.setFlyBehaviour(new FlyRocketPowered());
        modelDuck.performFly();

    }
}
